home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 4774 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.9 KB

  1. Path: solon.com!not-for-mail
  2. From: seebs@solutions.solon.com (Peter Seebach)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Unbuffered character input...
  5. Date: 6 Feb 1996 16:22:21 -0600
  6. Organization: Usenet Fact Police (Undercover)
  7. Message-ID: <4f8kat$ofv@solutions.solon.com>
  8. References: <Pine.SGI.3.91.960129190205.27936A-100000@tahiti.cs.unm.edu> <9602022043.AA13287@dxmint.cern.ch> <4f7hlf$87n@airdmhor.gen.nz> <9602061701.AA21789@dxmint.cern.ch>
  9. NNTP-Posting-Host: solutions.solon.com
  10.  
  11. In article <9602061701.AA21789@dxmint.cern.ch>,
  12. Dan Pop  <danpop@mail.cern.ch> wrote:
  13. >But even on systems where it is not, it still saves processor time.
  14. >The cpu overhead of making a single OS call to get a complete line of input
  15. >is smaller (sometimes significantly smaller) than the overhead of making
  16. >N OS calls, one for each character of the line.  The stdio library tries
  17. >to do its best to minimize the number of (expensive) OS calls.
  18.  
  19. Further, in some cases, it can be dramatically more uer efficient
  20. and user friendly to be line buffered.  The keyboard I'm typing
  21. on right now is about 30 gateways from the editor I'm typing to.
  22. If I were using a line buffered system, I would be able to see and correct
  23. my typos *instantly* (Would you believe less than 50 msec. response
  24. time?) rather than having to wait 30 seconds to a minute to see what I'm
  25. doing.  In fact, if I weren't on a buggy Sun system, I'd even be able to have
  26. the system switch modes, so that only applications incapable of using line
  27. buffering would have the slower response.  (Sun's telnet doesn't understand
  28. this quite right, and will botch horribly.)
  29.  
  30. This is drifting pretty far; please direct responses to me or others in
  31. email.
  32.  
  33. -s
  34. -- 
  35. Peter Seebach - seebs@solon.com - Copyright 1995 Peter Seebach.
  36. C/Unix wizard -- C/Unix questions? Send mail for help.  No, really!
  37. Using trn?  Weird new newsgroup problem?  I know the fix!  Email me!
  38. The *other* C FAQ - ftp taniemarie.solon.com /pub/c/afq - Not A Flying Toy
  39.